#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <assert.h>

int sim_strcmp(const char* p1, const char* p2)
{
	assert(p1 && p2);
	while (*p1 != '\0' && *p2 != '\0')
	{
		if (*p1 == *p2)
		{
			p1++;
			p2++;
		}
		else if (*p1 > *p2)
			return 1;
		else
			return-1;
	}
	if (*p1 == *p2)
		return 0;
	if (*p1 == '\0')
		return -1;
	if (*p2 == '\0')
		return 1;

}

int main()
{
	char arr1[] = "accs";
	char arr2[] = "acc";
	int ret = sim_strcmp(arr1, arr2);
	printf("%d", ret);
	return 0;
}